﻿USE [HelperDatabase];
SET NOCOUNT ON;
SET XACT_ABORT ON;
GO

BEGIN TRANSACTION;
INSERT INTO [dbo].[NhaCungCap]([MaNhaCungCap], [TenNhaCungCap], [TenGiaoDich], [MaThue], [TaiKhoanNganHang], [DiaChi], [DienThoai], [SoFax], [NguoiDaiDien], [Email], [GhiChu], [TrangThai], [deleted])
SELECT N'cleon', N'Cleon', N'Cleon', N'2323622785', N'TCB21412523', N'236 Lô B, Khu Công Nghiệp Tân Bình, Tp HCM, Việt Nam', N'23523535', N'23523537', NULL, N'cleponvn@gmail.com', NULL, NULL, 0 UNION ALL
SELECT N'domax', N'Domax', N'Domax', N'3235262362', N'DAB26784584', N'234 Lô B, Khu Công Nghiệp Tân Bình, Tp HCM, Việt Nam', N'23425235', N'23425237', NULL, N'domaxvn@gmail.com', NULL, NULL, 0 UNION ALL
SELECT N'gift', N'Gift', N'Gift', N'3252326235', N'ACB23422362', N'356 Lô A, Khu Công Nghiệp Tân Bình, Tp HCM, Việt Nam', N'32353252', N'32353257', NULL, N'gift@gmail.com', NULL, NULL, 0 UNION ALL
SELECT N'johnson&johnson', N'Johnson & Johnson', N'Johnson & Johnson', N'2351256235', N'VCB11256785', N'12th Floor, Habour View Tower 35 Nguyen Hue Boulevard, District 1, HCMC, Vietnam', N'23634567', N'23634568', NULL, N'j&j@jj.com', NULL, NULL, 0 UNION ALL
SELECT N'p&g', N'P&G', N'Protor & Gamble', N'2356246749', N'TCB35262365', N'Phòng 607-611, Tầng 6, Tòa Nhà Kim Cương, 34 Lê Duẩn, TpHCM, Vietnam', N'32523522', N'32523527', NULL, N'pgvn@pg.com', NULL, NULL, 0 UNION ALL
SELECT N'unilever', N'Unilever', N'Unilever', N'4672375378', N'ACB34567825', N'156 Nguyen Luong Bang Avenue, Tan Phu Ward, Dist 7, HCMC, Vietnam', N'34236326', N'34236327', NULL, N'unilevervn@unilever.com', NULL, NULL, 0
COMMIT;
RAISERROR (N'[dbo].[NhaCungCap]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[NhomHangHoa] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[NhomHangHoa]([NhomHangHoa_ID], [TenNhomHangHoa], [GhiChu], [TrangThai], [deleted])
SELECT 1, N'Văn Phòng Phẩm', N'Giấy in, kẹp tài liệu, bút dạ, sổ sách.....', N'', 0 UNION ALL
SELECT 2, N'Công cụ dụng cụ', N'', N'', 0 UNION ALL
SELECT 3, N'Vật tư nguyên liệu', N'', N'', 0 UNION ALL
SELECT 4, N'Bao bì bán hàng', N'', N'', 0 UNION ALL
SELECT 5, N'Tài sản cố định', N'', N'', 0
COMMIT;
RAISERROR (N'[dbo].[NhomHangHoa]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[NhomHangHoa] OFF;
SET IDENTITY_INSERT [dbo].[NhomNguoiDung] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[NhomNguoiDung]([NhomNguoiDung_ID], [TenNhom], [GhiChu], [TrangThai], [deleted])
SELECT 1, N'Admin', N'  Có tất cả các quyền hạn
', N'', 0 UNION ALL
SELECT 2, N'Sếp', NULL, NULL, 0 UNION ALL
SELECT 3, N'Kế Toán', NULL, NULL, 0 UNION ALL
SELECT 4, N'Kho', NULL, NULL, 0 UNION ALL
SELECT 5, N'Bộ phận mua hàng', NULL, NULL, 0
COMMIT;
RAISERROR (N'[dbo].[NhomNguoiDung]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[NhomNguoiDung] OFF;
BEGIN TRANSACTION;
INSERT INTO [dbo].[PhongBan]([MaPhongBan], [TenPhongBan], [MoTa], [deleted])
SELECT N'dieuhanh', N'Điều hành', N'Điều hành công ty
', 0 UNION ALL
SELECT N'it', N'IT', N'Chịu trách nhiệm hệ thống CNTT trong công ty', 0 UNION ALL
SELECT N'ketoan', N'Kế toán', NULL, 0 UNION ALL
SELECT N'kho', N'Kho	', NULL, 0 UNION ALL
SELECT N'muahang', N'Bộ phận mua hàng', NULL, 0
COMMIT;
RAISERROR (N'[dbo].[PhongBan]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

BEGIN TRANSACTION;
INSERT INTO [dbo].[HangHoa]([MaHangHoa], [NhomHangHoa_ID], [TenHangHoa], [DonVi], [Item_Measure], [MucDich], [MoTa], [NhapKho], [XuatKho], [NhapCuoi], [XuatCuoi], [TonKho], [TonKhoToiThieu], [TonKhoToiDa], [GhiChu], [TrangThai], [Gia], [deleted])
SELECT N'1', 1, N'Giấy A4', N'Gam', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'10', 2, N'Nón bảo hộ', N'Chiếc', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'11', 3, N'Nước lau nhà Vim', N'Chai', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'12', 3, N'Nước lau nhà Gift', N'Chai', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'13', 3, N'Thuốc tẩy WoSta', N'Chai', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'14', 3, N'Bột vi sinh Biol', N'Gói', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'15', 3, N'Nước lau nhà WaMal', N'Chai', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'16', 4, N'Bao rác nylon', N'Cuộn', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'17', 4, N'Bao rác nylon tái chế', N'Cuộn', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'18', 5, N'Bàn làm việc', N'Chiếc', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'19', 5, N'Ghế', N'Chiếc', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'2', 1, N'Sổ sách', N'Quyển', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'20', 5, N'Tủ hồ sơ', N'Chiếc', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'3', 1, N'Bút dạ', N'Cây', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'4', 1, N'Kẹp giấy', N'Chiếc', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'5', 1, N'Hồ sơ', N'Tệp', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'6', 2, N'Chổi', N'Chiếc', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'7', 2, N'Bàn chà', N'Chiếc', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'8', 2, N'Máy hút bụi', N'Chiếc', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0 UNION ALL
SELECT N'9', 2, N'Găng tay', N'Đôi', NULL, NULL, NULL, N'0', N'0', N'0', N'0', N'0', N'0', N'0', NULL, NULL, N'0', 0
COMMIT;
RAISERROR (N'[dbo].[HangHoa]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

BEGIN TRANSACTION;
INSERT INTO [dbo].[NguoiDung]([MaNguoiDung], [Password], [NhomNguoiDung_ID], [MaPhongBan], [ViTriPhongBan], [Ten], [NgaySinh], [Email], [ThongTinNhanVien], [TrangThai], [deleted])
SELECT N'alex', N'123456', 1, N'it', NULL, N'Alex', NULL, NULL, NULL, NULL, 0 UNION ALL
SELECT N'dhnhan', N'123456', 3, N'ketoan', N'Trưởng phòng Kế toán', N'Đỗ Hữu Nhân', '20100320 00:00:00.000', N'dhnhan@gmail.com', N'', N'', 0 UNION ALL
SELECT N'ltnong', N'123456', 5, N'muahang', N'Nhân Viên', N'Lê Tiến Nông', '20100320 00:00:00.000', N'ltnong@gmail.com', N'', N'', 0 UNION ALL
SELECT N'ncchinh', N'123456', 5, N'muahang', N'Trưởng bộ phận mua hàng', N'Nguyễn Cận Chinh', '20100320 00:00:00.000', N'ncchinh@gmail.com', N'', N'', 0 UNION ALL
SELECT N'nttu', N'123456', 3, N'ketoan', N'Nhân Viên', N'Nông Tất Tử', '20100320 00:00:00.000', N'nttu@gmail.com', N'', N'', 0 UNION ALL
SELECT N'nvhuan', N'123456', 4, N'kho', NULL, N'Nguyễn Văn Huân', NULL, NULL, NULL, NULL, 0 UNION ALL
SELECT N'nvkiet', N'123456', 5, N'muahang', N'Nhân viên', N'Nguyễn Văn Kiệt', '20100320 00:00:00.000', N'nvkiet@gmail.com', N'', N'', 0 UNION ALL
SELECT N'ttkien', N'123456', 3, N'ketoan', N'Nhân Viên', N'Trần Trung Kiên', '20100320 00:00:00.000', N'ttkien@gmail.com', N'sắp bị đuổi việc', N'', 0 UNION ALL
SELECT N'tvdung', N'123456', 2, N'dieuhanh', NULL, N'Trần Văn Dũng', NULL, NULL, NULL, NULL, 0
COMMIT;
RAISERROR (N'[dbo].[NguoiDung]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

BEGIN TRANSACTION;
INSERT INTO [dbo].[NhomNguoiDung_QuyenHan]([NhomNguoiDung_ID], [QuyenHanID], [TrangThai])
SELECT 1, 1, NULL UNION ALL
SELECT 1, 2, NULL UNION ALL
SELECT 1, 3, NULL UNION ALL
SELECT 1, 4, NULL UNION ALL
SELECT 1, 5, NULL UNION ALL
SELECT 1, 6, NULL UNION ALL
SELECT 1, 10, NULL UNION ALL
SELECT 1, 11, NULL UNION ALL
SELECT 1, 14, NULL UNION ALL
SELECT 1, 15, NULL UNION ALL
SELECT 1, 16, NULL UNION ALL
SELECT 1, 17, NULL UNION ALL
SELECT 1, 18, NULL UNION ALL
SELECT 1, 19, NULL UNION ALL
SELECT 1, 20, NULL UNION ALL
SELECT 1, 21, NULL UNION ALL
SELECT 1, 26, NULL UNION ALL
SELECT 1, 27, NULL UNION ALL
SELECT 1, 28, NULL UNION ALL
SELECT 2, 1, NULL UNION ALL
SELECT 2, 2, NULL UNION ALL
SELECT 2, 3, NULL UNION ALL
SELECT 2, 4, NULL UNION ALL
SELECT 2, 5, NULL UNION ALL
SELECT 2, 6, NULL UNION ALL
SELECT 2, 11, NULL UNION ALL
SELECT 2, 15, NULL UNION ALL
SELECT 2, 26, NULL UNION ALL
SELECT 2, 27, NULL UNION ALL
SELECT 2, 28, NULL UNION ALL
SELECT 3, 18, NULL UNION ALL
SELECT 3, 19, NULL UNION ALL
SELECT 3, 20, NULL UNION ALL
SELECT 3, 27, NULL UNION ALL
SELECT 4, 21, NULL UNION ALL
SELECT 5, 10, NULL UNION ALL
SELECT 5, 14, NULL UNION ALL
SELECT 5, 16, NULL UNION ALL
SELECT 5, 17, NULL
COMMIT;
RAISERROR (N'[dbo].[NhomNguoiDung_QuyenHan]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO


SET IDENTITY_INSERT [dbo].[HangHoa_NhaCungCap] OFF;
BEGIN TRANSACTION;
INSERT INTO [dbo].[PhieuDanhGiaNCC]([MaPhieu], [Content], [MaNguoiTao], [NgayTao], [MaNguoiDuyet], [NgayDuyet], [TrangThai], [LyDoKhongDuyet], [deleted])
SELECT N'DG.16.04.2010.011', N'', N'ltnong', '20100421 06:12:18.230', NULL, NULL, 5, NULL, 0 UNION ALL
SELECT N'DG.21.04.2010.001', N'', N'ltnong', '20100421 06:05:03.353', NULL, NULL, 5, NULL, 0 UNION ALL
SELECT N'DG.21.04.2010.002', N'', N'ltnong', '20100421 06:11:13.523', NULL, NULL, 5, NULL, 0 UNION ALL
SELECT N'DG.21.04.2010.004', N'', N'ltnong', '20100421 06:13:37.570', NULL, NULL, 4, N'Không đáp ứng tiêu chí đánh giá', 0 UNION ALL
SELECT N'DG.21.04.2010.005', N'', N'ltnong', '20100421 06:24:50.037', NULL, NULL, 5, NULL, 0 UNION ALL
SELECT N'DG.21.04.2010.006', N'', N'ltnong', '20100421 06:27:38.513', NULL, NULL, 5, NULL, 0 UNION ALL
SELECT N'DG.21.04.2010.007', N'', N'ncchinh', '20100421 06:28:48.073', NULL, NULL, 3, NULL, 0 UNION ALL
SELECT N'DG.21.04.2010.008', N'', N'nvkiet', '20100421 06:30:12.827', NULL, NULL, 5, NULL, 0 UNION ALL
SELECT N'MH.ĐGNCC.10.04.0001', NULL, N'nvkiet', '20200410 12:35:29.123', N'tvdung', '20200411 10:35:29.123', 3, NULL, 0 UNION ALL
SELECT N'MH.ĐGNCC.13.04.0002', N'', N'nvkiet', '20200413 13:36:29.123', N'tvdung', '20200414 10:35:29.123', 5, NULL, 0 UNION ALL
SELECT N'MH.ĐGNCC.17.04.0003', N'', N'nvkiet', '20200417 09:35:29.123', N'tvdung', '20200418 10:35:29.123', 5, NULL, 0 UNION ALL
SELECT N'MH.ĐGNCC.19.04.0004', N'', N'nvkiet', '20200419 10:12:29.123', N'tvdung', '20200420 11:35:29.123', 4, N'Có đến hai mặt hàng không đáp ứng đánh giá', 0 UNION ALL
SELECT N'MH.ĐGNCC.19.04.0005', N'', N'nvkiet', '20200419 16:56:29.123', N'tvdung', '20200420 16:35:29.123', 5, NULL, 0 UNION ALL
SELECT N'MH.ĐGNCC.20.04.0006', N'', N'nvkiet', '20200420 08:47:29.123', N'tvdung', '20200421 16:35:29.123', 5, NULL, 0 UNION ALL
SELECT N'MH.ĐGNCC.23.04.0007', N'', N'nvkiet', '20200423 15:32:29.123', N'tvdung', '20200424 10:35:29.123', 5, NULL, 0 UNION ALL
SELECT N'MH.ĐGNCC.23.04.0008', N'', N'nvkiet', '20200423 10:46:29.123', N'tvdung', '20200425 10:35:29.123', 5, NULL, 0 UNION ALL
SELECT N'MH.ĐGNCC.25.04.0009', N'', N'nvkiet', '20200425 15:23:29.123', N'tvdung', '20200427 10:35:29.123', 2, NULL, 0 UNION ALL
SELECT N'MH.ĐGNCC.25.04.0010', N'', N'nvkiet', '20200425 17:00:29.123', N'tvdung', '20200427 10:35:29.123', 5, NULL, 0
COMMIT;
RAISERROR (N'[dbo].[PhieuDanhGiaNCC]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

BEGIN TRANSACTION;
INSERT INTO [dbo].[PhieuDeNghiMuaHang]([MaPhieu], [MaNguoiTao], [NgayTao], [NgayHan], [MaNguoiDuyet], [NgayDuyet], [NoiDung], [LyDoKhongDuyet], [deleted])
SELECT N'DN.16.04.2010.002', N'ncchinh', '20100416 06:34:35.000', '20100422 06:34:35.000', N'tvdung', '20100421 06:39:20.480', N'', NULL, 0 UNION ALL
SELECT N'DN.16.04.2010.003', N'ncchinh', '20100416 06:35:41.000', '20100422 06:35:41.000', NULL, NULL, N'', NULL, 0 UNION ALL
SELECT N'DN.16.04.2010.01', N'nvkiet', '20100416 06:33:14.000', '20100421 06:33:14.133', N'tvdung', '20100421 06:39:44.123', N'', N'Khong Can Thiet', 0 UNION ALL
SELECT N'DN.17.04.2010.001', N'ltnong', '20100417 05:59:56.000', '20100421 05:59:56.870', N'tvdung', '20100421 06:39:23.220', N'', NULL, 0 UNION ALL
SELECT N'DN.17.04.2010.002', N'ltnong', '20100417 05:59:04.000', '20100421 05:59:04.060', N'tvdung', '20100421 06:39:29.410', N'', NULL, 0 UNION ALL
SELECT N'DN.18.04.2010.001', N'nvkiet', '20100408 06:46:51.000', '20100421 06:46:51.123', NULL, NULL, N'', NULL, 0 UNION ALL
SELECT N'DN.18.04.2010.002', N'nvkiet', '20100418 06:47:31.000', '20100421 06:47:31.433', NULL, NULL, N'', NULL, 0 UNION ALL
SELECT N'DN.18.04.2010.003', N'ltnong', '20100418 06:01:44.000', '20100421 06:01:44.507', N'tvdung', '20100421 06:39:26.417', N'', NULL, 0 UNION ALL
SELECT N'DN.19.04.2010.001', N'ltnong', '20100419 06:02:52.000', '20100421 06:02:52.337', NULL, NULL, N'', NULL, 0 UNION ALL
SELECT N'DN.19.04.2010.002', N'nvkiet', '20100419 06:32:19.000', '20100421 06:32:19.307', N'tvdung', '20100421 06:39:17.167', N'', NULL, 0 UNION ALL
SELECT N'DN.20.04.2010.001', N'nvkiet', '20100420 06:30:47.000', '20100421 06:30:47.010', NULL, NULL, N'', NULL, 0 UNION ALL
SELECT N'DN.20.04.2010.002', N'nvkiet', '20100420 06:31:48.000', '20100421 06:31:48.610', N'tvdung', '20100421 06:39:12.700', N'', NULL, 0 UNION ALL
SELECT N'DN.20.04.2010.003', N'nvkiet', '20100420 06:48:44.000', '20100421 06:48:44.593', NULL, NULL, N'', NULL, 0 UNION ALL
SELECT N'DN.21.04.2010.001', N'ltnong', '20100418 01:52:17.000', '20100421 01:52:17.327', NULL, NULL, N'', NULL, 1
COMMIT;
RAISERROR (N'[dbo].[PhieuDeNghiMuaHang]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

BEGIN TRANSACTION;
INSERT INTO [dbo].[PhieuMuaHang]([MaPhieu], [MaNguoiTao], [NgayTao], [MaNguoiDuyet], [NgayDuyet], [NoiDung], [deleted])
SELECT N'MH.18.04.2010.001', N'ncchinh', '20100421 06:42:06.583', NULL, NULL, N'Mua nón bảo hộ', 0 UNION ALL
SELECT N'MH.18.04.2010.002', N'ncchinh', '20100421 06:42:28.803', N'ncchinh', '20100421 06:43:18.197', N'', 0 UNION ALL
SELECT N'MH.20.04.2010.005', N'nvkiet', '20100421 06:44:06.423', N'nvkiet', '20100421 06:44:35.413', N'', 0 UNION ALL
SELECT N'MH.21.04.2010.003', N'ncchinh', '20100421 06:42:57.493', N'ncchinh', '20100421 06:43:03.877', N'', 0 UNION ALL
SELECT N'MH.21.04.2010.004', N'ncchinh', '20100421 06:43:28.323', N'nvkiet', '20100421 06:44:28.260', N'', 0 UNION ALL
SELECT N'MH.21.04.2010.006', N'nvkiet', '20100421 06:44:15.117', NULL, NULL, N'', 0
COMMIT;
RAISERROR (N'[dbo].[PhieuMuaHang]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

BEGIN TRANSACTION;
INSERT INTO [dbo].[PhieuTamUng]([MaPhieu], [MaNguoiTao], [NgayTao], [MaNguoiDuyet], [NgayDuyet], [LyDoKhongDuyet], [SoTien], [ThoiGian], [NoiDung], [deleted])
SELECT N'TU.21.04.2010.001', N'nvkiet', '20100421 06:44:54.003', NULL, NULL, NULL, N'30000', '20100420 06:44:42.000', N'', 0 UNION ALL
SELECT N'TU.21.04.2010.002', N'nvkiet', '20100421 06:46:15.393', NULL, NULL, NULL, N'200000', '20100420 06:45:48.000', N'', 0
COMMIT;
RAISERROR (N'[dbo].[PhieuTamUng]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[HangHoa_NhaCungCap] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[HangHoa_NhaCungCap]([HangHoa_NhaCungCap_ID], [MaHangHoa], [MaNhaCungCap], [PhieuDanhGiaNCC_ID], [ChatLuong], [Gia], [HauMai], [ThoiGianGiaoHang], [HinhThucThanhToan], [GhiChu], [Dat])
SELECT 3, N'1', N'domax', N'MH.ĐGNCC.25.04.0009', 9, N'8', 6, 7, 5, NULL, 1 UNION ALL
SELECT 4, N'11', N'unilever', N'MH.ĐGNCC.23.04.0007', 9, N'9', 9, 9, 9, NULL, 1 UNION ALL
SELECT 5, N'13', N'unilever', N'MH.ĐGNCC.23.04.0007', 9, N'9', 9, 9, 9, NULL, 1 UNION ALL
SELECT 6, N'12', N'p&g', N'MH.ĐGNCC.23.04.0008', 9, N'8', 6, 7, 9, NULL, 1 UNION ALL
SELECT 7, N'8', N'domax', N'MH.ĐGNCC.20.04.0006', 9, N'7', 4, 2, 4, NULL, 0 UNION ALL
SELECT 8, N'14', N'johnson&johnson', N'MH.ĐGNCC.19.04.0005', 8, N'8', 6, 7, 8, NULL, 1 UNION ALL
SELECT 9, N'15', N'johnson&johnson', N'MH.ĐGNCC.19.04.0005', 8, N'9', 9, 7, 9, NULL, 1 UNION ALL
SELECT 10, N'7', N'gift', N'MH.ĐGNCC.19.04.0004', 8, N'7', 7, 9, 9, NULL, 1 UNION ALL
SELECT 11, N'6', N'gift', N'MH.ĐGNCC.19.04.0004', 7, N'9', 7, 6, 9, NULL, 1 UNION ALL
SELECT 12, N'16', N'gift', N'MH.ĐGNCC.19.04.0004', 6, N'7', 1, 1, 2, NULL, 0 UNION ALL
SELECT 13, N'17', N'gift', N'MH.ĐGNCC.19.04.0004', 7, N'8', 1, 1, 2, NULL, 0 UNION ALL
SELECT 14, N'2', N'p&g', N'MH.ĐGNCC.17.04.0003', 9, N'8', 8, 7, 9, NULL, 1 UNION ALL
SELECT 15, N'3', N'p&g', N'MH.ĐGNCC.17.04.0003', 9, N'8', 7, 9, 9, NULL, 1 UNION ALL
SELECT 16, N'4', N'unilever', N'MH.ĐGNCC.13.04.0002', 9, N'9', 9, 8, 9, NULL, 1 UNION ALL
SELECT 17, N'3', N'unilever', N'MH.ĐGNCC.13.04.0002', 9, N'8', 7, 9, 6, NULL, 1 UNION ALL
SELECT 20, N'2', N'unilever', N'DG.21.04.2010.001', 8, N'7', 8, 6, 9, NULL, 1 UNION ALL
SELECT 21, N'1', N'unilever', N'DG.21.04.2010.001', 6, N'7', 6, 9, 8, NULL, 1 UNION ALL
SELECT 22, N'10', N'cleon', N'MH.ĐGNCC.25.04.0010', 6, N'7', 6, 8, 7, NULL, 1 UNION ALL
SELECT 23, N'9', N'cleon', N'MH.ĐGNCC.25.04.0010', 9, N'9', 6, 8, 7, NULL, 1 UNION ALL
SELECT 24, N'11', N'gift', N'DG.21.04.2010.002', 8, N'9', 6, 7, 7, NULL, 1 UNION ALL
SELECT 25, N'12', N'gift', N'DG.21.04.2010.002', 7, N'8', 7, 9, 8, NULL, 1 UNION ALL
SELECT 26, N'13', N'domax', N'DG.16.04.2010.011', 78, N'9', 7, 8, 8, NULL, 1 UNION ALL
SELECT 27, N'14', N'gift', N'DG.16.04.2010.011', 7, N'8', 86, 7, 8, NULL, 1 UNION ALL
SELECT 28, N'1', N'cleon', N'DG.21.04.2010.004', 7, N'2', 2, 7, 2, NULL, 0 UNION ALL
SELECT 29, N'2', N'cleon', N'DG.21.04.2010.004', 4, N'8', 7, 8, 6, NULL, 1 UNION ALL
SELECT 30, N'3', N'domax', N'DG.21.04.2010.005', 9, N'8', 8, 7, 7, NULL, 1 UNION ALL
SELECT 31, N'9', N'domax', N'DG.21.04.2010.005', 9, N'8', 8, 9, 9, NULL, 1 UNION ALL
SELECT 32, N'14', N'johnson&johnson', N'DG.21.04.2010.006', 9, N'8', 8, 9, 9, N' ', 1 UNION ALL
SELECT 33, N'13', N'johnson&johnson', N'DG.21.04.2010.006', 8, N'9', 9, 8, 9, NULL, 1 UNION ALL
SELECT 34, N'1', N'johnson&johnson', N'DG.21.04.2010.007', 9, N'8', 8, 7, 7, NULL, 1 UNION ALL
SELECT 35, N'2', N'johnson&johnson', N'DG.21.04.2010.007', 7, N'8', 8, 7, 7, NULL, 1 UNION ALL
SELECT 36, N'16', N'unilever', N'DG.21.04.2010.008', 8, N'9', 98, 8, 7, NULL, 1 UNION ALL
SELECT 37, N'7', N'unilever', N'DG.21.04.2010.008', 8, N'9', 9, 8, 8, NULL, 1
COMMIT;
RAISERROR (N'[dbo].[HangHoa_NhaCungCap]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO
SET IDENTITY_INSERT [dbo].[HangHoa_NhaCungCap] OFF;

SET IDENTITY_INSERT [dbo].[PhieuDeNghiMuaHang_HangHoa] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[PhieuDeNghiMuaHang_HangHoa]([ID], [MaHangHoa], [MaPhieuDeNghiMuaHang], [SoLuongDeNghi], [GiaThamKhao], [NhaCungCapThamKhao], [HangHoa_NhaCungCap_ID], [SoLuongMua], [SoLuongNhapKho])
SELECT 1, N'11', N'DN.21.04.2010.001', N'100', N'20000', NULL, NULL, NULL, NULL UNION ALL
SELECT 2, N'10', N'DN.17.04.2010.002', N'20', N'50000', NULL, 22, N'20', NULL UNION ALL
SELECT 3, N'11', N'DN.17.04.2010.001', N'100', N'20000', NULL, 4, N'100', NULL UNION ALL
SELECT 4, N'13', N'DN.18.04.2010.003', N'20', N'30000', NULL, 5, N'20', NULL UNION ALL
SELECT 5, N'15', N'DN.18.04.2010.003', N'50', N'20000', NULL, 9, N'50', NULL UNION ALL
SELECT 8, N'3', N'DN.19.04.2010.001', N'20', N'12000', NULL, NULL, NULL, NULL UNION ALL
SELECT 9, N'2', N'DN.19.04.2010.001', N'20', N'0', NULL, NULL, NULL, NULL UNION ALL
SELECT 10, N'2', N'DN.20.04.2010.001', N'10', N'30000', NULL, NULL, NULL, NULL UNION ALL
SELECT 11, N'1', N'DN.20.04.2010.001', N'30', N'60000', NULL, NULL, NULL, NULL UNION ALL
SELECT 12, N'15', N'DN.20.04.2010.002', N'20', N'20000', NULL, 9, N'20', NULL UNION ALL
SELECT 13, N'12', N'DN.20.04.2010.002', N'30', N'20000', NULL, 25, N'30', NULL UNION ALL
SELECT 14, N'11', N'DN.19.04.2010.002', N'30', N'20000', NULL, 4, N'30', NULL UNION ALL
SELECT 15, N'12', N'DN.19.04.2010.002', N'20', N'20000', NULL, 25, N'20', NULL UNION ALL
SELECT 16, N'7', N'DN.16.04.2010.01', N'5', N'20000', NULL, NULL, NULL, NULL UNION ALL
SELECT 17, N'6', N'DN.16.04.2010.01', N'15', N'10000', NULL, NULL, NULL, NULL UNION ALL
SELECT 18, N'13', N'DN.16.04.2010.002', N'20', N'20000', NULL, 26, N'20', NULL UNION ALL
SELECT 19, N'12', N'DN.16.04.2010.002', N'10', N'25000', NULL, 25, N'10', NULL UNION ALL
SELECT 20, N'10', N'DN.16.04.2010.003', N'23', N'55000', NULL, NULL, NULL, NULL UNION ALL
SELECT 21, N'9', N'DN.16.04.2010.003', N'35', N'10000', NULL, NULL, NULL, NULL UNION ALL
SELECT 22, N'11', N'DN.18.04.2010.001', N'20', N'20000', NULL, NULL, NULL, NULL UNION ALL
SELECT 23, N'12', N'DN.18.04.2010.001', N'30', N'19000', NULL, NULL, NULL, NULL UNION ALL
SELECT 24, N'3', N'DN.18.04.2010.002', N'20', N'15000', NULL, NULL, NULL, NULL UNION ALL
SELECT 25, N'2', N'DN.18.04.2010.002', N'20', N'40000', NULL, NULL, NULL, NULL UNION ALL
SELECT 26, N'1', N'DN.20.04.2010.003', N'16', N'54000', NULL, NULL, NULL, NULL UNION ALL
SELECT 27, N'2', N'DN.20.04.2010.003', N'20', N'40000', NULL, NULL, NULL, NULL
COMMIT;
RAISERROR (N'[dbo].[PhieuDeNghiMuaHang_HangHoa]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO
SET IDENTITY_INSERT [dbo].[PhieuDeNghiMuaHang_HangHoa] OFF;

SET IDENTITY_INSERT [dbo].[QuyTrinhMuaHang] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[QuyTrinhMuaHang]([ID], [TenQuyTrinh], [TrangThai], [MaPhieuDeNghiMuaHang], [MaPhieuMuaHang], [MaPhieuTamUng], [MaPhieuThanhToan], [deleted])
SELECT 1, N'4/21/2010 1:53:09 AM', 1, N'DN.21.04.2010.001', NULL, NULL, NULL, 1 UNION ALL
SELECT 2, N'4/21/2010 5:59:42 AM', 5, N'DN.17.04.2010.002', N'MH.18.04.2010.001', NULL, NULL, 0 UNION ALL
SELECT 3, N'4/21/2010 6:00:17 AM', 7, N'DN.17.04.2010.001', N'MH.18.04.2010.002', N'TU.21.04.2010.001', NULL, 0 UNION ALL
SELECT 4, N'4/21/2010 6:02:28 AM', 10, N'DN.18.04.2010.003', N'MH.21.04.2010.003', NULL, NULL, 0 UNION ALL
SELECT 5, N'4/21/2010 6:03:27 AM', 2, N'DN.19.04.2010.001', NULL, NULL, NULL, 0 UNION ALL
SELECT 6, N'4/21/2010 6:31:31 AM', 2, N'DN.20.04.2010.001', NULL, NULL, NULL, 0 UNION ALL
SELECT 7, N'4/21/2010 6:32:17 AM', 6, N'DN.20.04.2010.002', N'MH.21.04.2010.004', N'TU.21.04.2010.002', NULL, 0 UNION ALL
SELECT 8, N'4/21/2010 6:32:53 AM', 10, N'DN.19.04.2010.002', N'MH.20.04.2010.005', NULL, NULL, 0 UNION ALL
SELECT 9, N'4/21/2010 6:33:57 AM', 3, N'DN.16.04.2010.01', NULL, NULL, NULL, 0 UNION ALL
SELECT 10, N'4/21/2010 6:35:13 AM', 5, N'DN.16.04.2010.002', N'MH.21.04.2010.006', NULL, NULL, 0 UNION ALL
SELECT 11, N'4/21/2010 6:36:36 AM', 2, N'DN.16.04.2010.003', NULL, NULL, NULL, 0 UNION ALL
SELECT 12, N'4/21/2010 6:47:24 AM', 2, N'DN.18.04.2010.001', NULL, NULL, NULL, 0 UNION ALL
SELECT 13, N'4/21/2010 6:48:01 AM', 1, N'DN.18.04.2010.002', NULL, NULL, NULL, 0 UNION ALL
SELECT 14, N'4/21/2010 6:49:20 AM', 2, N'DN.20.04.2010.003', NULL, NULL, NULL, 0
COMMIT;
RAISERROR (N'[dbo].[QuyTrinhMuaHang]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[QuyTrinhMuaHang] OFF;
